<!--
 * @Author: your name
 * @Date: 2020-08-28 11:31:03
 * @LastEditTime: 2020-08-28 11:37:14
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \tinkjsDemo\antd-vue-pro\tests\demo\Untitled-1.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="div1">div1

        <div id="div2" >div2</div>
    </div>
    
    
    <script>

        window.onload=function(){
            
            document.getElementById('div1').addEventListener('click',function(e){
                console.log('div1 click event');
            })
            document.getElementById('div2').addEventListener('click',function(e){
                e.preventDefault();
                e.stopPropagation();
                console.log('div2 click event');
            })
        }
    </script>
</body>
</html>